Repository navigation
Finish MRI's message-quoting migration: 13 sites still wrote `x' where 4.0 writes 'x' - #900
Merged
Merged
Conversation
MRI stopped writing `name' and writes 'name' since 3.4. v4.0.9 is straight-quoted
throughout -- numeric.c:3207 "integer %lu too big to convert to 'unsigned int'",
file.c:3908 "couldn't find HOME environment -- expanding '~'", both read from the
tag.
rbgo migrated most of its messages and missed thirteen sites. It was only
visible because the SAME message ended up in both spellings in one package:
builtins.go:3321 "bignum too big to convert into 'long'"
arith.go:675 "bignum too big to convert into `long'"
That is not a style choice, it is half a migration.
## What was missed
arith.go:675 bignum too big to convert into `long'
builtins.go:6028 bignum too big to convert into `long'
builtins.go:10288 `%s' is not allowed as a class variable name
dir.go:503 couldn't find HOME environment -- expanding `~'
file.go:1010 couldn't find HOME environment -- expanding `~'
ivar_reflect.go:71 `%s' is not allowed as an instance variable name
modulefunc.go:534 `%s' is not allowed as a class variable name
numeric_edges.go:49 integer %d too big to convert to `int'
numeric_edges.go:53 bignum too big to convert into `long'
oauth2_client.go:91 undefined method `authorize_url' for %s
opentelemetry.go:116 undefined method `add_span_processor' for ...
rspec.go:252 undefined method `of' for matcher
rspec.go:260 undefined method `with' for matcher
The last four imitate NoMethodError, which rbgo's own dispatcher already writes
with straight quotes -- they disagreed with the engine they sit in.
## How it was found, and how the search was widened
A probe of twelve NameError shapes against MRI 4.0.7 named FIVE. Fixing those
five would have left eight, so the search was widened to every raise() in the
package carrying a backtick: 47 lines, of which 13 were this family.
## The two tests moved with the quoting, not because they were wrong
module_wave16_internal_test.go pinned `foo' and `@@'. Both now pin the 4.0 form
with the two citations above beside them, so a reader finding this diff later
knows the expectation changed because MRI's did.
## The gate
A note saying "finish the migration" would be forgotten exactly the way the
first half was, so message_quoting_test.go scans every non-test source file in
the package and fails on the old form. It logs how many files it read (542) and
refuses below 50: a scan that cannot say what it looked at cannot be told from a
scan that could not look.
## The gate's own first version was wrong, and its test says so
Matching the whole line reported string_undump.go twice. That message is a Go
RAW string, where the backtick is the DELIMITER and not part of the message. A
detector that cannot tell a delimiter from content reports defects that are not
there, so the detector is now a function with six rows of its own -- including
that raw string, prose that pairs its backticks, and an escaped quote inside a
message.
## Measured
rubydiff against /opt/homebrew/opt/ruby@4.0/bin/ruby on twelve NameError and
RangeError shapes: DIVERGE on 5 before, AGREE after.
go vet ./... clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MRI stopped writing
`name'and writes'name'since 3.4.v4.0.9is straight-quoted throughout —numeric.c:3207andfile.c:3908, both read from the tag.rbgo migrated most of its messages and missed thirteen sites. That was only visible because the same message ended up in both spellings in one package:
That is not a style choice. It is half a migration.
What was missed
arith.go:675,builtins.go:6028,numeric_edges.go:53bignum too big to convert into `long'numeric_edges.go:49integer %d too big to convert to `int'builtins.go:10288,modulefunc.go:534`%s' is not allowed as a class variable nameivar_reflect.go:71`%s' is not allowed as an instance variable namedir.go:503,file.go:1010couldn't find HOME environment -- expanding `~'oauth2_client.go:91,opentelemetry.go:116,rspec.go:252,rspec.go:260undefined method `x' for …The last four imitate
NoMethodError, which rbgo's own dispatcher already writes with straight quotes — they disagreed with the engine they sit in.The search was widened because the probe was narrow
A probe of twelve
NameErrorshapes against MRI 4.0.7 named five. Fixing those five would have left eight behind, so the search widened to everyraise(in the package carrying a backtick: 47 lines, of which 13 were this family.The two tests moved with the quoting, not because they were wrong
module_wave16_internal_test.gopinned`foo'and`@@'. Both now pin the 4.0 form, with the two citations beside them, so a reader who finds this diff later knows the expectation changed because MRI's did.The gate
A note saying "finish the migration" would be forgotten exactly the way the first half was, so
message_quoting_test.goscans every non-test source file in the package and fails on the old form. It logs how many files it read (542) and refuses below 50 — a scan that cannot say what it looked at cannot be told from a scan that could not look.⛔ The gate's own first version was wrong, and its test now says so
Matching the whole line reported
string_undump.gotwice. That message is a Go raw string, where the backtick is the delimiter and not part of the message at all. A detector that cannot tell a delimiter from content reports defects that are not there — so the detector is now a function with six rows of its own, covering that raw string, prose that pairs its backticks, and an escaped quote inside a message.Measured
rubydiffagainst/opt/homebrew/opt/ruby@4.0/bin/rubyon twelveNameError/RangeErrorshapes: DIVERGE on 5 before, AGREE after.go vet ./...clean.Two unrelated divergences the probe turned up
Filed separately rather than fixed here, since neither is about quoting:
Array.new(2**128)→ MRIRangeError: bignum too big to convert into 'long', rbgoArgumentError: array size too big— a different class, not just a different message.File.expand_path("~")withHOMEdeleted → MRI does not raise at all; rbgo raisesArgumentError.🤖 Generated with Claude Code